import React from 'react'
import Source, { ISourceChildProps } from 'grey-react-box/Source'
import { decorator } from 'grey-react-box'
import Ms from './Demo.box';
import Demo from './Demo';

const Main = decorator<any, ISourceChildProps<Ms>>(
    Source.connect()
)(props => {
    return (
        <div>
            <Demo />
        </div>
    );
})

export default () => {

    const box = React.useMemo(() => new Ms(), []);

    return (
        <Source box={box}>
            <Main />
        </Source>
    )
}